package com.java01;

import java.util.Scanner;

/*
* while循环
*/
public class seventhjava {
    public static void main(String[] args) {
        int i = 1;
        while ( i<=100 ){
            if (i % 3 == 0) {
                System.out.println(i);
            }
            i++;
        }
    }
}

class dowhile01{
    public static void main(String[] args) {
        int i = 1;
        do {
            System.out.println(i);
            i++;
        }while (i<=10);
    }
}

class dowhile02{
    public static void main(String[] args) {
        boolean a;
        char s;
        Scanner scanner = new Scanner(System.in);
        do {
            System.out.println("y/n");
            s = scanner.next().charAt(0);
            if (s == 'y'){
                a = true;
            }else {
                a = false;
            }
        }while (!a);
    }
}